package scau.erps.view.decision.sand;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 * 沙盘模拟模板抽象类_4Q
 * @author DCJ
 *
 */
public abstract class SandPanelTemplateFor4Q extends JPanel{
	private static final long serialVersionUID = 1L;
	protected JPanel financePanel;
	protected JLabel titleLabel,label1,label2,label3,label4;
	protected JTextField jtx_1q,jtx_2q,jtx_3q,jtx_4q;
	public SandPanelTemplateFor4Q(){
		JPanel financePanel = new JPanel(new BorderLayout());
		financePanel.setPreferredSize(new Dimension(80,120));
		JPanel panel = new JPanel(new GridLayout(4,2,1,1));		
		panel.setPreferredSize(new Dimension(60,100));		
		titleLabel = new JLabel();
		titleLabel.setHorizontalAlignment(JLabel.CENTER);
		label1 = new JLabel("1Q");
		label2 = new JLabel("2Q");
		label3 = new JLabel("3Q");
		label4 = new JLabel("4Q");
		label1.setHorizontalAlignment(JLabel.CENTER);
		label2.setHorizontalAlignment(JLabel.CENTER);
		label3.setHorizontalAlignment(JLabel.CENTER);
		label4.setHorizontalAlignment(JLabel.CENTER);
		jtx_1q = new JTextField();
		jtx_2q = new JTextField();
		jtx_3q = new JTextField();
		jtx_4q = new JTextField();
		jtx_1q.setEditable(false);
		jtx_2q.setEditable(false);
		jtx_3q.setEditable(false);
		jtx_4q.setEditable(false);
		jtx_1q.setEnabled(false);
		jtx_2q.setEnabled(false);
		jtx_3q.setEnabled(false);
		jtx_4q.setEnabled(false);
		jtx_1q.setHorizontalAlignment(JTextField.CENTER);
		jtx_2q.setHorizontalAlignment(JTextField.CENTER);
		jtx_3q.setHorizontalAlignment(JTextField.CENTER);
		jtx_4q.setHorizontalAlignment(JTextField.CENTER);		
		panel.add(label1);
		panel.add(jtx_1q);
		panel.add(label2);
		panel.add(jtx_2q);
		panel.add(label3);
		panel.add(jtx_3q);
		panel.add(label4);
		panel.add(jtx_4q);
		financePanel.add(titleLabel,BorderLayout.NORTH);
		financePanel.add(panel,BorderLayout.CENTER);
		this.add(financePanel);
	}
	public abstract void setTextFieldValue();
}
